/*
 * Copyright (C) 2019 Baidu, Inc. All Rights Reserved.
 */
package com.bootdo.hjh.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.bootdo.hjh.dao.provider.TihuoOrderProvider;
import com.bootdo.hjh.domain.StockDO;
import com.bootdo.hjh.domain.TihuoOrderDO;

/**
 * 提货申请单
 *
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2019-04-13 16:13:13
 */
@Mapper
public interface TihuoOrderDao {

    TihuoOrderDO get(Long id);

    List<TihuoOrderDO> list(Map<String, Object> map);

    int count(Map<String, Object> map);

    int save(TihuoOrderDO tihuoOrder);

    int update(TihuoOrderDO tihuoOrder);

    int remove(Long id);

    int batchRemove(Long[] ids);

    @SelectProvider(type = TihuoOrderProvider.class, method = "listTihuoOrders")
    List<TihuoOrderDO> listTihuoOrders(@Param("userId") Long userId, @Param("productId") Integer productId,
                                  @Param("offset") Integer offset, @Param("limit") Integer limit);

    @SelectProvider(type = TihuoOrderProvider.class, method = "countTihuoOrder")
    Integer countTihuoOrder(@Param("userId") Long userId, @Param("productId") Integer productId);

    @UpdateProvider(type = TihuoOrderProvider.class, method = "updateFahuo")
    int updateFahuo(@Param("id") Integer id, @Param("status") Integer shippingStatus,
                    @Param("shippingChannel") Integer shippingChannel, @Param("shippingSn") String shippingSn);
}
